 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKEdcps/EdcpsModel.h>

@implementation AliasIp
-(id) initWithInstanceId:(NSString*) instanceId
      region:(NSString*)region
      az:(NSString*)az
      subnetId:(NSString*)subnetId
      secondaryCidrId:(NSString*)secondaryCidrId
      aliasIpId:(NSString*)aliasIpId
      cidr:(NSString*)cidr { 
     self.instanceId = instanceId;               
     self.region = region;               
     self.az = az;               
     self.subnetId = subnetId;               
     self.secondaryCidrId = secondaryCidrId;               
     self.aliasIpId = aliasIpId;               
     self.cidr = cidr;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self az])
    {
        [result setValue:[self az] forKey:@"az"];
    }
    if([self subnetId])
    {
        [result setValue:[self subnetId] forKey:@"subnetId"];
    }
    if([self secondaryCidrId])
    {
        [result setValue:[self secondaryCidrId] forKey:@"secondaryCidrId"];
    }
    if([self aliasIpId])
    {
        [result setValue:[self aliasIpId] forKey:@"aliasIpId"];
    }
    if([self cidr])
    {
        [result setValue:[self cidr] forKey:@"cidr"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    self.region = [dictionary objectForKey:@"region"];
    self.az = [dictionary objectForKey:@"az"];
    self.subnetId = [dictionary objectForKey:@"subnetId"];
    self.secondaryCidrId = [dictionary objectForKey:@"secondaryCidrId"];
    self.aliasIpId = [dictionary objectForKey:@"aliasIpId"];
    self.cidr = [dictionary objectForKey:@"cidr"];
    return self;
}
 @end
@implementation Os
-(id) initWithOsTypeId:(NSString*) osTypeId
      osName:(NSString*)osName
      osType:(NSString*)osType
      osVersion:(NSString*)osVersion
      deviceType:(NSString*)deviceType { 
     self.osTypeId = osTypeId;               
     self.osName = osName;               
     self.osType = osType;               
     self.osVersion = osVersion;               
     self.deviceType = deviceType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self osTypeId])
    {
        [result setValue:[self osTypeId] forKey:@"osTypeId"];
    }
    if([self osName])
    {
        [result setValue:[self osName] forKey:@"osName"];
    }
    if([self osType])
    {
        [result setValue:[self osType] forKey:@"osType"];
    }
    if([self osVersion])
    {
        [result setValue:[self osVersion] forKey:@"osVersion"];
    }
    if([self deviceType])
    {
        [result setValue:[self deviceType] forKey:@"deviceType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.osTypeId = [dictionary objectForKey:@"osTypeId"];
    self.osName = [dictionary objectForKey:@"osName"];
    self.osType = [dictionary objectForKey:@"osType"];
    self.osVersion = [dictionary objectForKey:@"osVersion"];
    self.deviceType = [dictionary objectForKey:@"deviceType"];
    return self;
}
 @end
@implementation SubnetSpec
-(id) initWithAz:(NSString*) az
      vpcId:(NSString*)vpcId
      cidr:(NSString*)cidr
      secondaryCidr:(NSString*)secondaryCidr
      secondaryCidrName:(NSString*)secondaryCidrName
      name:(NSString*)name
      descriptionValue:(NSString*)descriptionValue { 
     self.az = az;               
     self.vpcId = vpcId;               
     self.cidr = cidr;               
     self.secondaryCidr = secondaryCidr;               
     self.secondaryCidrName = secondaryCidrName;               
     self.name = name;               
     self.descriptionValue = descriptionValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self az])
    {
        [result setValue:[self az] forKey:@"az"];
    }
    if([self vpcId])
    {
        [result setValue:[self vpcId] forKey:@"vpcId"];
    }
    if([self cidr])
    {
        [result setValue:[self cidr] forKey:@"cidr"];
    }
    if([self secondaryCidr])
    {
        [result setValue:[self secondaryCidr] forKey:@"secondaryCidr"];
    }
    if([self secondaryCidrName])
    {
        [result setValue:[self secondaryCidrName] forKey:@"secondaryCidrName"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.az = [dictionary objectForKey:@"az"];
    self.vpcId = [dictionary objectForKey:@"vpcId"];
    self.cidr = [dictionary objectForKey:@"cidr"];
    self.secondaryCidr = [dictionary objectForKey:@"secondaryCidr"];
    self.secondaryCidrName = [dictionary objectForKey:@"secondaryCidrName"];
    self.name = [dictionary objectForKey:@"name"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    return self;
}
 @end
@implementation ReinstallInstanceSpec
-(id) initWithAz:(NSString*) az
      imageType:(NSString*)imageType
      osTypeId:(NSString*)osTypeId
      sysRaidTypeId:(NSString*)sysRaidTypeId
      keepData:(NSString*)keepData
      dataRaidTypeId:(NSString*)dataRaidTypeId
      password:(NSString*)password
      hostname:(NSString*)hostname
      userData:(NSString*)userData
      keypairId:(NSString*)keypairId { 
     self.az = az;               
     self.imageType = imageType;               
     self.osTypeId = osTypeId;               
     self.sysRaidTypeId = sysRaidTypeId;               
     self.keepData = keepData;               
     self.dataRaidTypeId = dataRaidTypeId;               
     self.password = password;               
     self.hostname = hostname;               
     self.userData = userData;               
     self.keypairId = keypairId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self az])
    {
        [result setValue:[self az] forKey:@"az"];
    }
    if([self imageType])
    {
        [result setValue:[self imageType] forKey:@"imageType"];
    }
    if([self osTypeId])
    {
        [result setValue:[self osTypeId] forKey:@"osTypeId"];
    }
    if([self sysRaidTypeId])
    {
        [result setValue:[self sysRaidTypeId] forKey:@"sysRaidTypeId"];
    }
    if([self keepData])
    {
        [result setValue:[self keepData] forKey:@"keepData"];
    }
    if([self dataRaidTypeId])
    {
        [result setValue:[self dataRaidTypeId] forKey:@"dataRaidTypeId"];
    }
    if([self password])
    {
        [result setValue:[self password] forKey:@"password"];
    }
    if([self hostname])
    {
        [result setValue:[self hostname] forKey:@"hostname"];
    }
    if([self userData])
    {
        [result setValue:[self userData] forKey:@"userData"];
    }
    if([self keypairId])
    {
        [result setValue:[self keypairId] forKey:@"keypairId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.az = [dictionary objectForKey:@"az"];
    self.imageType = [dictionary objectForKey:@"imageType"];
    self.osTypeId = [dictionary objectForKey:@"osTypeId"];
    self.sysRaidTypeId = [dictionary objectForKey:@"sysRaidTypeId"];
    self.keepData = [dictionary objectForKey:@"keepData"];
    self.dataRaidTypeId = [dictionary objectForKey:@"dataRaidTypeId"];
    self.password = [dictionary objectForKey:@"password"];
    self.hostname = [dictionary objectForKey:@"hostname"];
    self.userData = [dictionary objectForKey:@"userData"];
    self.keypairId = [dictionary objectForKey:@"keypairId"];
    return self;
}
 @end
@implementation Subnet
-(id) initWithRegion:(NSString*) region
      az:(NSString*)az
      subnetId:(NSString*)subnetId
      name:(NSString*)name
      cidr:(NSString*)cidr
      vpcId:(NSString*)vpcId
      vpcName:(NSString*)vpcName
      availableIpCount:(NSNumber*)availableIpCount
      totalIpCount:(NSNumber*)totalIpCount
      networkType:(NSString*)networkType
      descriptionValue:(NSString*)descriptionValue
      createTime:(NSString*)createTime { 
     self.region = region;               
     self.az = az;               
     self.subnetId = subnetId;               
     self.name = name;               
     self.cidr = cidr;               
     self.vpcId = vpcId;               
     self.vpcName = vpcName;               
     self.availableIpCount = availableIpCount;               
     self.totalIpCount = totalIpCount;               
     self.networkType = networkType;               
     self.descriptionValue = descriptionValue;               
     self.createTime = createTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self az])
    {
        [result setValue:[self az] forKey:@"az"];
    }
    if([self subnetId])
    {
        [result setValue:[self subnetId] forKey:@"subnetId"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self cidr])
    {
        [result setValue:[self cidr] forKey:@"cidr"];
    }
    if([self vpcId])
    {
        [result setValue:[self vpcId] forKey:@"vpcId"];
    }
    if([self vpcName])
    {
        [result setValue:[self vpcName] forKey:@"vpcName"];
    }
    if([self availableIpCount])
    {
        [result setValue:[self availableIpCount] forKey:@"availableIpCount"];
    }
    if([self totalIpCount])
    {
        [result setValue:[self totalIpCount] forKey:@"totalIpCount"];
    }
    if([self networkType])
    {
        [result setValue:[self networkType] forKey:@"networkType"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.region = [dictionary objectForKey:@"region"];
    self.az = [dictionary objectForKey:@"az"];
    self.subnetId = [dictionary objectForKey:@"subnetId"];
    self.name = [dictionary objectForKey:@"name"];
    self.cidr = [dictionary objectForKey:@"cidr"];
    self.vpcId = [dictionary objectForKey:@"vpcId"];
    self.vpcName = [dictionary objectForKey:@"vpcName"];
    self.availableIpCount = [dictionary objectForKey:@"availableIpCount"];
    self.totalIpCount = [dictionary objectForKey:@"totalIpCount"];
    self.networkType = [dictionary objectForKey:@"networkType"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    return self;
}
 @end
@implementation Az
-(id) initWithRegion:(NSString*) region
      azValue:(NSString*)azValue
      azName:(NSString*)azName { 
     self.region = region;               
     self.azValue = azValue;               
     self.azName = azName;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self azValue])
    {
        [result setValue:[self azValue] forKey:@"az"];
    }
    if([self azName])
    {
        [result setValue:[self azName] forKey:@"azName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.region = [dictionary objectForKey:@"region"];
    self.azValue = [dictionary objectForKey:@"az"];
    self.azName = [dictionary objectForKey:@"azName"];
    return self;
}
 @end
@implementation LineType
-(id) initWithLineTypeValue:(NSString*) lineTypeValue
      region:(NSString*)region { 
     self.lineTypeValue = lineTypeValue;               
     self.region = region;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self lineTypeValue])
    {
        [result setValue:[self lineTypeValue] forKey:@"lineType"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.lineTypeValue = [dictionary objectForKey:@"lineType"];
    self.region = [dictionary objectForKey:@"region"];
    return self;
}
 @end
@implementation AliasIpInfo
-(id) initWithId:(NSString*) idValue
      cidr:(NSString*)cidr { 
     self.idValue = idValue;               
     self.cidr = cidr;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self cidr])
    {
        [result setValue:[self cidr] forKey:@"cidr"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.cidr = [dictionary objectForKey:@"cidr"];
    return self;
}
 @end
@implementation Keypair
-(id) initWithKeypairId:(NSString*) keypairId
      region:(NSString*)region
      name:(NSString*)name
      publicKey:(NSString*)publicKey
      fingerPrint:(NSString*)fingerPrint
      createTime:(NSString*)createTime
      updateTime:(NSString*)updateTime { 
     self.keypairId = keypairId;               
     self.region = region;               
     self.name = name;               
     self.publicKey = publicKey;               
     self.fingerPrint = fingerPrint;               
     self.createTime = createTime;               
     self.updateTime = updateTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self keypairId])
    {
        [result setValue:[self keypairId] forKey:@"keypairId"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self publicKey])
    {
        [result setValue:[self publicKey] forKey:@"publicKey"];
    }
    if([self fingerPrint])
    {
        [result setValue:[self fingerPrint] forKey:@"fingerPrint"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keypairId = [dictionary objectForKey:@"keypairId"];
    self.region = [dictionary objectForKey:@"region"];
    self.name = [dictionary objectForKey:@"name"];
    self.publicKey = [dictionary objectForKey:@"publicKey"];
    self.fingerPrint = [dictionary objectForKey:@"fingerPrint"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    return self;
}
 @end
@implementation SecondaryCidr
-(id) initWithSecondaryCidrId:(NSString*) secondaryCidrId
      cidr:(NSString*)cidr
      region:(NSString*)region
      az:(NSString*)az
      subnetId:(NSString*)subnetId
      name:(NSString*)name
      vpcId:(NSString*)vpcId
      vpcName:(NSString*)vpcName
      availableIpCount:(NSNumber*)availableIpCount
      totalIpCount:(NSNumber*)totalIpCount { 
     self.secondaryCidrId = secondaryCidrId;               
     self.cidr = cidr;               
     self.region = region;               
     self.az = az;               
     self.subnetId = subnetId;               
     self.name = name;               
     self.vpcId = vpcId;               
     self.vpcName = vpcName;               
     self.availableIpCount = availableIpCount;               
     self.totalIpCount = totalIpCount;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self secondaryCidrId])
    {
        [result setValue:[self secondaryCidrId] forKey:@"secondaryCidrId"];
    }
    if([self cidr])
    {
        [result setValue:[self cidr] forKey:@"cidr"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self az])
    {
        [result setValue:[self az] forKey:@"az"];
    }
    if([self subnetId])
    {
        [result setValue:[self subnetId] forKey:@"subnetId"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self vpcId])
    {
        [result setValue:[self vpcId] forKey:@"vpcId"];
    }
    if([self vpcName])
    {
        [result setValue:[self vpcName] forKey:@"vpcName"];
    }
    if([self availableIpCount])
    {
        [result setValue:[self availableIpCount] forKey:@"availableIpCount"];
    }
    if([self totalIpCount])
    {
        [result setValue:[self totalIpCount] forKey:@"totalIpCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secondaryCidrId = [dictionary objectForKey:@"secondaryCidrId"];
    self.cidr = [dictionary objectForKey:@"cidr"];
    self.region = [dictionary objectForKey:@"region"];
    self.az = [dictionary objectForKey:@"az"];
    self.subnetId = [dictionary objectForKey:@"subnetId"];
    self.name = [dictionary objectForKey:@"name"];
    self.vpcId = [dictionary objectForKey:@"vpcId"];
    self.vpcName = [dictionary objectForKey:@"vpcName"];
    self.availableIpCount = [dictionary objectForKey:@"availableIpCount"];
    self.totalIpCount = [dictionary objectForKey:@"totalIpCount"];
    return self;
}
 @end
@implementation AliasIpErrorInfo
-(id) initWithCidr:(NSString*) cidr
      message:(NSString*)message { 
     self.cidr = cidr;               
     self.message = message;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self cidr])
    {
        [result setValue:[self cidr] forKey:@"cidr"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cidr = [dictionary objectForKey:@"cidr"];
    self.message = [dictionary objectForKey:@"message"];
    return self;
}
 @end
@implementation Raid
-(id) initWithVolumeType:(NSString*) volumeType
      volumeDetail:(NSString*)volumeDetail
      raidTypeId:(NSString*)raidTypeId
      raidType:(NSString*)raidType
      deviceType:(NSString*)deviceType
      descriptionValue:(NSString*)descriptionValue { 
     self.volumeType = volumeType;               
     self.volumeDetail = volumeDetail;               
     self.raidTypeId = raidTypeId;               
     self.raidType = raidType;               
     self.deviceType = deviceType;               
     self.descriptionValue = descriptionValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self volumeType])
    {
        [result setValue:[self volumeType] forKey:@"volumeType"];
    }
    if([self volumeDetail])
    {
        [result setValue:[self volumeDetail] forKey:@"volumeDetail"];
    }
    if([self raidTypeId])
    {
        [result setValue:[self raidTypeId] forKey:@"raidTypeId"];
    }
    if([self raidType])
    {
        [result setValue:[self raidType] forKey:@"raidType"];
    }
    if([self deviceType])
    {
        [result setValue:[self deviceType] forKey:@"deviceType"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.volumeType = [dictionary objectForKey:@"volumeType"];
    self.volumeDetail = [dictionary objectForKey:@"volumeDetail"];
    self.raidTypeId = [dictionary objectForKey:@"raidTypeId"];
    self.raidType = [dictionary objectForKey:@"raidType"];
    self.deviceType = [dictionary objectForKey:@"deviceType"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    return self;
}
 @end
@implementation VpcSpec
-(id) initWithCidr:(NSString*) cidr
      name:(NSString*)name
      descriptionValue:(NSString*)descriptionValue { 
     self.cidr = cidr;               
     self.name = name;               
     self.descriptionValue = descriptionValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self cidr])
    {
        [result setValue:[self cidr] forKey:@"cidr"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cidr = [dictionary objectForKey:@"cidr"];
    self.name = [dictionary objectForKey:@"name"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    return self;
}
 @end
@implementation SecondaryCidrSpec
-(id) initWithSubnetId:(NSString*) subnetId
      cidr:(NSString*)cidr
      name:(NSString*)name { 
     self.subnetId = subnetId;               
     self.cidr = cidr;               
     self.name = name;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self subnetId])
    {
        [result setValue:[self subnetId] forKey:@"subnetId"];
    }
    if([self cidr])
    {
        [result setValue:[self cidr] forKey:@"cidr"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.subnetId = [dictionary objectForKey:@"subnetId"];
    self.cidr = [dictionary objectForKey:@"cidr"];
    self.name = [dictionary objectForKey:@"name"];
    return self;
}
 @end
@implementation ResourceStock
-(id) initWithDeviceType:(NSString*) deviceType
      region:(NSString*)region
      available:(NSNumber*)available { 
     self.deviceType = deviceType;               
     self.region = region;               
     self.available = available;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self deviceType])
    {
        [result setValue:[self deviceType] forKey:@"deviceType"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self available])
    {
        [result setValue:[self available] forKey:@"available"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.deviceType = [dictionary objectForKey:@"deviceType"];
    self.region = [dictionary objectForKey:@"region"];
    self.available = [dictionary objectForKey:@"available"];
    return self;
}
 @end
@implementation DeviceType
-(id) initWithDeviceTypeValue:(NSString*) deviceTypeValue
      name:(NSString*)name
      family:(NSString*)family
      region:(NSString*)region
      cpuConcise:(NSString*)cpuConcise
      cpuDetail:(NSString*)cpuDetail
      memConcise:(NSString*)memConcise
      memDetail:(NSString*)memDetail
      ifConcise:(NSString*)ifConcise
      ifDetail:(NSString*)ifDetail
      gpuConcise:(NSString*)gpuConcise
      gpuDetail:(NSString*)gpuDetail
      systemDiskAmount:(NSNumber*)systemDiskAmount
      systemDiskSize:(NSNumber*)systemDiskSize
      systemDiskModel:(NSString*)systemDiskModel
      dataDiskAmount:(NSNumber*)dataDiskAmount
      dataDiskSize:(NSNumber*)dataDiskSize
      dataDiskModel:(NSString*)dataDiskModel
      isSoldOut:(NSNumber*)isSoldOut { 
     self.deviceTypeValue = deviceTypeValue;               
     self.name = name;               
     self.family = family;               
     self.region = region;               
     self.cpuConcise = cpuConcise;               
     self.cpuDetail = cpuDetail;               
     self.memConcise = memConcise;               
     self.memDetail = memDetail;               
     self.ifConcise = ifConcise;               
     self.ifDetail = ifDetail;               
     self.gpuConcise = gpuConcise;               
     self.gpuDetail = gpuDetail;               
     self.systemDiskAmount = systemDiskAmount;               
     self.systemDiskSize = systemDiskSize;               
     self.systemDiskModel = systemDiskModel;               
     self.dataDiskAmount = dataDiskAmount;               
     self.dataDiskSize = dataDiskSize;               
     self.dataDiskModel = dataDiskModel;               
     self.isSoldOut = isSoldOut;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self deviceTypeValue])
    {
        [result setValue:[self deviceTypeValue] forKey:@"deviceType"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self family])
    {
        [result setValue:[self family] forKey:@"family"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self cpuConcise])
    {
        [result setValue:[self cpuConcise] forKey:@"cpuConcise"];
    }
    if([self cpuDetail])
    {
        [result setValue:[self cpuDetail] forKey:@"cpuDetail"];
    }
    if([self memConcise])
    {
        [result setValue:[self memConcise] forKey:@"memConcise"];
    }
    if([self memDetail])
    {
        [result setValue:[self memDetail] forKey:@"memDetail"];
    }
    if([self ifConcise])
    {
        [result setValue:[self ifConcise] forKey:@"ifConcise"];
    }
    if([self ifDetail])
    {
        [result setValue:[self ifDetail] forKey:@"ifDetail"];
    }
    if([self gpuConcise])
    {
        [result setValue:[self gpuConcise] forKey:@"gpuConcise"];
    }
    if([self gpuDetail])
    {
        [result setValue:[self gpuDetail] forKey:@"gpuDetail"];
    }
    if([self systemDiskAmount])
    {
        [result setValue:[self systemDiskAmount] forKey:@"systemDiskAmount"];
    }
    if([self systemDiskSize])
    {
        [result setValue:[self systemDiskSize] forKey:@"systemDiskSize"];
    }
    if([self systemDiskModel])
    {
        [result setValue:[self systemDiskModel] forKey:@"systemDiskModel"];
    }
    if([self dataDiskAmount])
    {
        [result setValue:[self dataDiskAmount] forKey:@"dataDiskAmount"];
    }
    if([self dataDiskSize])
    {
        [result setValue:[self dataDiskSize] forKey:@"dataDiskSize"];
    }
    if([self dataDiskModel])
    {
        [result setValue:[self dataDiskModel] forKey:@"dataDiskModel"];
    }
    if([self isSoldOut])
    {
        [result setValue:[self isSoldOut] forKey:@"isSoldOut"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.deviceTypeValue = [dictionary objectForKey:@"deviceType"];
    self.name = [dictionary objectForKey:@"name"];
    self.family = [dictionary objectForKey:@"family"];
    self.region = [dictionary objectForKey:@"region"];
    self.cpuConcise = [dictionary objectForKey:@"cpuConcise"];
    self.cpuDetail = [dictionary objectForKey:@"cpuDetail"];
    self.memConcise = [dictionary objectForKey:@"memConcise"];
    self.memDetail = [dictionary objectForKey:@"memDetail"];
    self.ifConcise = [dictionary objectForKey:@"ifConcise"];
    self.ifDetail = [dictionary objectForKey:@"ifDetail"];
    self.gpuConcise = [dictionary objectForKey:@"gpuConcise"];
    self.gpuDetail = [dictionary objectForKey:@"gpuDetail"];
    self.systemDiskAmount = [dictionary objectForKey:@"systemDiskAmount"];
    self.systemDiskSize = [dictionary objectForKey:@"systemDiskSize"];
    self.systemDiskModel = [dictionary objectForKey:@"systemDiskModel"];
    self.dataDiskAmount = [dictionary objectForKey:@"dataDiskAmount"];
    self.dataDiskSize = [dictionary objectForKey:@"dataDiskSize"];
    self.dataDiskModel = [dictionary objectForKey:@"dataDiskModel"];
    self.isSoldOut = [dictionary objectForKey:@"isSoldOut"];
    return self;
}
 @end
@implementation Vpc
-(id) initWithRegion:(NSString*) region
      vpcId:(NSString*)vpcId
      name:(NSString*)name
      cidr:(NSString*)cidr
      descriptionValue:(NSString*)descriptionValue
      createTime:(NSString*)createTime { 
     self.region = region;               
     self.vpcId = vpcId;               
     self.name = name;               
     self.cidr = cidr;               
     self.descriptionValue = descriptionValue;               
     self.createTime = createTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self vpcId])
    {
        [result setValue:[self vpcId] forKey:@"vpcId"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self cidr])
    {
        [result setValue:[self cidr] forKey:@"cidr"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.region = [dictionary objectForKey:@"region"];
    self.vpcId = [dictionary objectForKey:@"vpcId"];
    self.name = [dictionary objectForKey:@"name"];
    self.cidr = [dictionary objectForKey:@"cidr"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    return self;
}
 @end
@implementation AliasIpSuccessInfo
-(id) initWithAliasIpId:(NSString*) aliasIpId
      cidr:(NSString*)cidr { 
     self.aliasIpId = aliasIpId;               
     self.cidr = cidr;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aliasIpId])
    {
        [result setValue:[self aliasIpId] forKey:@"aliasIpId"];
    }
    if([self cidr])
    {
        [result setValue:[self cidr] forKey:@"cidr"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aliasIpId = [dictionary objectForKey:@"aliasIpId"];
    self.cidr = [dictionary objectForKey:@"cidr"];
    return self;
}
 @end
@implementation ElasticIp
-(id) initWithRegion:(NSString*) region
      elasticIpId:(NSString*)elasticIpId
      elasticIpValue:(NSString*)elasticIpValue
      bandwidth:(NSNumber*)bandwidth
      extraUplinkBandwidth:(NSNumber*)extraUplinkBandwidth
      lineType:(NSString*)lineType
      status:(NSString*)status
      instanceType:(NSString*)instanceType
      instanceId:(NSString*)instanceId
      createTime:(NSString*)createTime
      aliasIpId:(NSString*)aliasIpId
      charge:(Charge*)charge { 
     self.region = region;               
     self.elasticIpId = elasticIpId;               
     self.elasticIpValue = elasticIpValue;               
     self.bandwidth = bandwidth;               
     self.extraUplinkBandwidth = extraUplinkBandwidth;               
     self.lineType = lineType;               
     self.status = status;               
     self.instanceType = instanceType;               
     self.instanceId = instanceId;               
     self.createTime = createTime;               
     self.aliasIpId = aliasIpId;               
     self.charge = charge;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self elasticIpId])
    {
        [result setValue:[self elasticIpId] forKey:@"elasticIpId"];
    }
    if([self elasticIpValue])
    {
        [result setValue:[self elasticIpValue] forKey:@"elasticIp"];
    }
    if([self bandwidth])
    {
        [result setValue:[self bandwidth] forKey:@"bandwidth"];
    }
    if([self extraUplinkBandwidth])
    {
        [result setValue:[self extraUplinkBandwidth] forKey:@"extraUplinkBandwidth"];
    }
    if([self lineType])
    {
        [result setValue:[self lineType] forKey:@"lineType"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self instanceType])
    {
        [result setValue:[self instanceType] forKey:@"instanceType"];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self aliasIpId])
    {
        [result setValue:[self aliasIpId] forKey:@"aliasIpId"];
    }
    if([self charge])
    {
        [result setValue:[[self charge] dictionary]forKey:@"charge"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.region = [dictionary objectForKey:@"region"];
    self.elasticIpId = [dictionary objectForKey:@"elasticIpId"];
    self.elasticIpValue = [dictionary objectForKey:@"elasticIp"];
    self.bandwidth = [dictionary objectForKey:@"bandwidth"];
    self.extraUplinkBandwidth = [dictionary objectForKey:@"extraUplinkBandwidth"];
    self.lineType = [dictionary objectForKey:@"lineType"];
    self.status = [dictionary objectForKey:@"status"];
    self.instanceType = [dictionary objectForKey:@"instanceType"];
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.aliasIpId = [dictionary objectForKey:@"aliasIpId"];
    self.charge = [[Charge alloc]initWithDic:[dictionary objectForKey:@"charge"]];
    return self;
}
 @end
@implementation ElasticIpSpec
-(id) initWithBandwidth:(NSNumber*) bandwidth
      extraUplinkBandwidth:(NSNumber*)extraUplinkBandwidth
      count:(NSNumber*)count
      charge:(ChargeSpec*)charge { 
     self.bandwidth = bandwidth;               
     self.extraUplinkBandwidth = extraUplinkBandwidth;               
     self.count = count;               
     self.charge = charge;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self bandwidth])
    {
        [result setValue:[self bandwidth] forKey:@"bandwidth"];
    }
    if([self extraUplinkBandwidth])
    {
        [result setValue:[self extraUplinkBandwidth] forKey:@"extraUplinkBandwidth"];
    }
    if([self count])
    {
        [result setValue:[self count] forKey:@"count"];
    }
    if([self charge])
    {
        [result setValue:[[self charge] dictionary]forKey:@"charge"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.bandwidth = [dictionary objectForKey:@"bandwidth"];
    self.extraUplinkBandwidth = [dictionary objectForKey:@"extraUplinkBandwidth"];
    self.count = [dictionary objectForKey:@"count"];
    self.charge = [[ChargeSpec alloc]initWithDic:[dictionary objectForKey:@"charge"]];
    return self;
}
 @end
@implementation Instance
-(id) initWithInstanceId:(NSString*) instanceId
      region:(NSString*)region
      az:(NSString*)az
      deviceType:(NSString*)deviceType
      name:(NSString*)name
      descriptionValue:(NSString*)descriptionValue
      status:(NSString*)status
      enableInternet:(NSString*)enableInternet
      enableIpv6:(NSString*)enableIpv6
      bandwidth:(NSNumber*)bandwidth
      extraUplinkBandwidth:(NSNumber*)extraUplinkBandwidth
      imageType:(NSString*)imageType
      osTypeId:(NSString*)osTypeId
      osName:(NSString*)osName
      osType:(NSString*)osType
      osVersion:(NSString*)osVersion
      sysRaidTypeId:(NSString*)sysRaidTypeId
      sysRaidType:(NSString*)sysRaidType
      dataRaidTypeId:(NSString*)dataRaidTypeId
      dataRaidType:(NSString*)dataRaidType
      networkType:(NSString*)networkType
      vpcId:(NSString*)vpcId
      vpcName:(NSString*)vpcName
      subnetId:(NSString*)subnetId
      subnetName:(NSString*)subnetName
      privateIp:(NSString*)privateIp
      lineType:(NSString*)lineType
      elasticIpId:(NSString*)elasticIpId
      publicIp:(NSString*)publicIp
      publicIpv6:(NSString*)publicIpv6
      keypairId:(NSString*)keypairId
      agentStatus:(NSString*)agentStatus
      charge:(Charge*)charge { 
     self.instanceId = instanceId;               
     self.region = region;               
     self.az = az;               
     self.deviceType = deviceType;               
     self.name = name;               
     self.descriptionValue = descriptionValue;               
     self.status = status;               
     self.enableInternet = enableInternet;               
     self.enableIpv6 = enableIpv6;               
     self.bandwidth = bandwidth;               
     self.extraUplinkBandwidth = extraUplinkBandwidth;               
     self.imageType = imageType;               
     self.osTypeId = osTypeId;               
     self.osName = osName;               
     self.osType = osType;               
     self.osVersion = osVersion;               
     self.sysRaidTypeId = sysRaidTypeId;               
     self.sysRaidType = sysRaidType;               
     self.dataRaidTypeId = dataRaidTypeId;               
     self.dataRaidType = dataRaidType;               
     self.networkType = networkType;               
     self.vpcId = vpcId;               
     self.vpcName = vpcName;               
     self.subnetId = subnetId;               
     self.subnetName = subnetName;               
     self.privateIp = privateIp;               
     self.lineType = lineType;               
     self.elasticIpId = elasticIpId;               
     self.publicIp = publicIp;               
     self.publicIpv6 = publicIpv6;               
     self.keypairId = keypairId;               
     self.agentStatus = agentStatus;               
     self.charge = charge;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self az])
    {
        [result setValue:[self az] forKey:@"az"];
    }
    if([self deviceType])
    {
        [result setValue:[self deviceType] forKey:@"deviceType"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self enableInternet])
    {
        [result setValue:[self enableInternet] forKey:@"enableInternet"];
    }
    if([self enableIpv6])
    {
        [result setValue:[self enableIpv6] forKey:@"enableIpv6"];
    }
    if([self bandwidth])
    {
        [result setValue:[self bandwidth] forKey:@"bandwidth"];
    }
    if([self extraUplinkBandwidth])
    {
        [result setValue:[self extraUplinkBandwidth] forKey:@"extraUplinkBandwidth"];
    }
    if([self imageType])
    {
        [result setValue:[self imageType] forKey:@"imageType"];
    }
    if([self osTypeId])
    {
        [result setValue:[self osTypeId] forKey:@"osTypeId"];
    }
    if([self osName])
    {
        [result setValue:[self osName] forKey:@"osName"];
    }
    if([self osType])
    {
        [result setValue:[self osType] forKey:@"osType"];
    }
    if([self osVersion])
    {
        [result setValue:[self osVersion] forKey:@"osVersion"];
    }
    if([self sysRaidTypeId])
    {
        [result setValue:[self sysRaidTypeId] forKey:@"sysRaidTypeId"];
    }
    if([self sysRaidType])
    {
        [result setValue:[self sysRaidType] forKey:@"sysRaidType"];
    }
    if([self dataRaidTypeId])
    {
        [result setValue:[self dataRaidTypeId] forKey:@"dataRaidTypeId"];
    }
    if([self dataRaidType])
    {
        [result setValue:[self dataRaidType] forKey:@"dataRaidType"];
    }
    if([self networkType])
    {
        [result setValue:[self networkType] forKey:@"networkType"];
    }
    if([self vpcId])
    {
        [result setValue:[self vpcId] forKey:@"vpcId"];
    }
    if([self vpcName])
    {
        [result setValue:[self vpcName] forKey:@"vpcName"];
    }
    if([self subnetId])
    {
        [result setValue:[self subnetId] forKey:@"subnetId"];
    }
    if([self subnetName])
    {
        [result setValue:[self subnetName] forKey:@"subnetName"];
    }
    if([self privateIp])
    {
        [result setValue:[self privateIp] forKey:@"privateIp"];
    }
    if([self lineType])
    {
        [result setValue:[self lineType] forKey:@"lineType"];
    }
    if([self elasticIpId])
    {
        [result setValue:[self elasticIpId] forKey:@"elasticIpId"];
    }
    if([self publicIp])
    {
        [result setValue:[self publicIp] forKey:@"publicIp"];
    }
    if([self publicIpv6])
    {
        [result setValue:[self publicIpv6] forKey:@"publicIpv6"];
    }
    if([self keypairId])
    {
        [result setValue:[self keypairId] forKey:@"keypairId"];
    }
    if([self agentStatus])
    {
        [result setValue:[self agentStatus] forKey:@"agentStatus"];
    }
    if([self charge])
    {
        [result setValue:[[self charge] dictionary]forKey:@"charge"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    self.region = [dictionary objectForKey:@"region"];
    self.az = [dictionary objectForKey:@"az"];
    self.deviceType = [dictionary objectForKey:@"deviceType"];
    self.name = [dictionary objectForKey:@"name"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.status = [dictionary objectForKey:@"status"];
    self.enableInternet = [dictionary objectForKey:@"enableInternet"];
    self.enableIpv6 = [dictionary objectForKey:@"enableIpv6"];
    self.bandwidth = [dictionary objectForKey:@"bandwidth"];
    self.extraUplinkBandwidth = [dictionary objectForKey:@"extraUplinkBandwidth"];
    self.imageType = [dictionary objectForKey:@"imageType"];
    self.osTypeId = [dictionary objectForKey:@"osTypeId"];
    self.osName = [dictionary objectForKey:@"osName"];
    self.osType = [dictionary objectForKey:@"osType"];
    self.osVersion = [dictionary objectForKey:@"osVersion"];
    self.sysRaidTypeId = [dictionary objectForKey:@"sysRaidTypeId"];
    self.sysRaidType = [dictionary objectForKey:@"sysRaidType"];
    self.dataRaidTypeId = [dictionary objectForKey:@"dataRaidTypeId"];
    self.dataRaidType = [dictionary objectForKey:@"dataRaidType"];
    self.networkType = [dictionary objectForKey:@"networkType"];
    self.vpcId = [dictionary objectForKey:@"vpcId"];
    self.vpcName = [dictionary objectForKey:@"vpcName"];
    self.subnetId = [dictionary objectForKey:@"subnetId"];
    self.subnetName = [dictionary objectForKey:@"subnetName"];
    self.privateIp = [dictionary objectForKey:@"privateIp"];
    self.lineType = [dictionary objectForKey:@"lineType"];
    self.elasticIpId = [dictionary objectForKey:@"elasticIpId"];
    self.publicIp = [dictionary objectForKey:@"publicIp"];
    self.publicIpv6 = [dictionary objectForKey:@"publicIpv6"];
    self.keypairId = [dictionary objectForKey:@"keypairId"];
    self.agentStatus = [dictionary objectForKey:@"agentStatus"];
    self.charge = [[Charge alloc]initWithDic:[dictionary objectForKey:@"charge"]];
    return self;
}
 @end
@implementation RenewalResource
-(id) initWithResourceId:(NSString*) resourceId
      resourceName:(NSString*)resourceName
      remark:(NSString*)remark
      bind:(NSArray<RenewalResource*>*)bind { 
     self.resourceId = resourceId;               
     self.resourceName = resourceName;               
     self.remark = remark;               
     self.bind = bind;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self resourceName])
    {
        [result setValue:[self resourceName] forKey:@"resourceName"];
    }
    if([self remark])
    {
        [result setValue:[self remark] forKey:@"remark"];
    }
    if([self bind])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self bind] count]; i++) {
            RenewalResource* item = [[self bind] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"bind"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.resourceName = [dictionary objectForKey:@"resourceName"];
    self.remark = [dictionary objectForKey:@"remark"];
    NSArray* bindArray = [dictionary objectForKey:@"bind"];
    if(bindArray&&![bindArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [bindArray count];i++)
        {
            RenewalResource* item = [[RenewalResource alloc]initWithDic:[bindArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.bind = propertyArray;
    }
    return self;
}
 @end
@implementation AliasIpSpec
-(id) initWithInstanceId:(NSString*) instanceId
      aliasIps:(NSArray<AliasIpInfo*>*)aliasIps { 
     self.instanceId = instanceId;               
     self.aliasIps = aliasIps;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    if([self aliasIps])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self aliasIps] count]; i++) {
            AliasIpInfo* item = [[self aliasIps] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"aliasIps"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    NSArray* aliasIpsArray = [dictionary objectForKey:@"aliasIps"];
    if(aliasIpsArray&&![aliasIpsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [aliasIpsArray count];i++)
        {
            AliasIpInfo* item = [[AliasIpInfo alloc]initWithDic:[aliasIpsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.aliasIps = propertyArray;
    }
    return self;
}
 @end
@implementation Region
-(id) initWithRegionValue:(NSString*) regionValue
      regionName:(NSString*)regionName
      azs:(NSArray<Az*>*)azs { 
     self.regionValue = regionValue;               
     self.regionName = regionName;               
     self.azs = azs;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self regionValue])
    {
        [result setValue:[self regionValue] forKey:@"region"];
    }
    if([self regionName])
    {
        [result setValue:[self regionName] forKey:@"regionName"];
    }
    if([self azs])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self azs] count]; i++) {
            Az* item = [[self azs] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"azs"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.regionValue = [dictionary objectForKey:@"region"];
    self.regionName = [dictionary objectForKey:@"regionName"];
    NSArray* azsArray = [dictionary objectForKey:@"azs"];
    if(azsArray&&![azsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [azsArray count];i++)
        {
            Az* item = [[Az alloc]initWithDic:[azsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.azs = propertyArray;
    }
    return self;
}
 @end
@implementation InstanceSpec
-(id) initWithAz:(NSString*) az
      deviceType:(NSString*)deviceType
      hostname:(NSString*)hostname
      imageType:(NSString*)imageType
      osTypeId:(NSString*)osTypeId
      sysRaidTypeId:(NSString*)sysRaidTypeId
      dataRaidTypeId:(NSString*)dataRaidTypeId
      subnetId:(NSString*)subnetId
      enableInternet:(NSString*)enableInternet
      networkType:(NSString*)networkType
      cidr:(NSString*)cidr
      privateIp:(NSString*)privateIp
      lineType:(NSString*)lineType
      bandwidth:(NSNumber*)bandwidth
      extraUplinkBandwidth:(NSNumber*)extraUplinkBandwidth
      name:(NSString*)name
      descriptionValue:(NSString*)descriptionValue
      password:(NSString*)password
      count:(NSNumber*)count
      userData:(NSString*)userData
      keypairId:(NSString*)keypairId
      charge:(ChargeSpec*)charge
      aliasIps:(NSArray<AliasIpInfo*>*)aliasIps { 
     self.az = az;               
     self.deviceType = deviceType;               
     self.hostname = hostname;               
     self.imageType = imageType;               
     self.osTypeId = osTypeId;               
     self.sysRaidTypeId = sysRaidTypeId;               
     self.dataRaidTypeId = dataRaidTypeId;               
     self.subnetId = subnetId;               
     self.enableInternet = enableInternet;               
     self.networkType = networkType;               
     self.cidr = cidr;               
     self.privateIp = privateIp;               
     self.lineType = lineType;               
     self.bandwidth = bandwidth;               
     self.extraUplinkBandwidth = extraUplinkBandwidth;               
     self.name = name;               
     self.descriptionValue = descriptionValue;               
     self.password = password;               
     self.count = count;               
     self.userData = userData;               
     self.keypairId = keypairId;               
     self.charge = charge;               
     self.aliasIps = aliasIps;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self az])
    {
        [result setValue:[self az] forKey:@"az"];
    }
    if([self deviceType])
    {
        [result setValue:[self deviceType] forKey:@"deviceType"];
    }
    if([self hostname])
    {
        [result setValue:[self hostname] forKey:@"hostname"];
    }
    if([self imageType])
    {
        [result setValue:[self imageType] forKey:@"imageType"];
    }
    if([self osTypeId])
    {
        [result setValue:[self osTypeId] forKey:@"osTypeId"];
    }
    if([self sysRaidTypeId])
    {
        [result setValue:[self sysRaidTypeId] forKey:@"sysRaidTypeId"];
    }
    if([self dataRaidTypeId])
    {
        [result setValue:[self dataRaidTypeId] forKey:@"dataRaidTypeId"];
    }
    if([self subnetId])
    {
        [result setValue:[self subnetId] forKey:@"subnetId"];
    }
    if([self enableInternet])
    {
        [result setValue:[self enableInternet] forKey:@"enableInternet"];
    }
    if([self networkType])
    {
        [result setValue:[self networkType] forKey:@"networkType"];
    }
    if([self cidr])
    {
        [result setValue:[self cidr] forKey:@"cidr"];
    }
    if([self privateIp])
    {
        [result setValue:[self privateIp] forKey:@"privateIp"];
    }
    if([self lineType])
    {
        [result setValue:[self lineType] forKey:@"lineType"];
    }
    if([self bandwidth])
    {
        [result setValue:[self bandwidth] forKey:@"bandwidth"];
    }
    if([self extraUplinkBandwidth])
    {
        [result setValue:[self extraUplinkBandwidth] forKey:@"extraUplinkBandwidth"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self password])
    {
        [result setValue:[self password] forKey:@"password"];
    }
    if([self count])
    {
        [result setValue:[self count] forKey:@"count"];
    }
    if([self userData])
    {
        [result setValue:[self userData] forKey:@"userData"];
    }
    if([self keypairId])
    {
        [result setValue:[self keypairId] forKey:@"keypairId"];
    }
    if([self charge])
    {
        [result setValue:[[self charge] dictionary]forKey:@"charge"];
    }
    if([self aliasIps])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self aliasIps] count]; i++) {
            AliasIpInfo* item = [[self aliasIps] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"aliasIps"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.az = [dictionary objectForKey:@"az"];
    self.deviceType = [dictionary objectForKey:@"deviceType"];
    self.hostname = [dictionary objectForKey:@"hostname"];
    self.imageType = [dictionary objectForKey:@"imageType"];
    self.osTypeId = [dictionary objectForKey:@"osTypeId"];
    self.sysRaidTypeId = [dictionary objectForKey:@"sysRaidTypeId"];
    self.dataRaidTypeId = [dictionary objectForKey:@"dataRaidTypeId"];
    self.subnetId = [dictionary objectForKey:@"subnetId"];
    self.enableInternet = [dictionary objectForKey:@"enableInternet"];
    self.networkType = [dictionary objectForKey:@"networkType"];
    self.cidr = [dictionary objectForKey:@"cidr"];
    self.privateIp = [dictionary objectForKey:@"privateIp"];
    self.lineType = [dictionary objectForKey:@"lineType"];
    self.bandwidth = [dictionary objectForKey:@"bandwidth"];
    self.extraUplinkBandwidth = [dictionary objectForKey:@"extraUplinkBandwidth"];
    self.name = [dictionary objectForKey:@"name"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.password = [dictionary objectForKey:@"password"];
    self.count = [dictionary objectForKey:@"count"];
    self.userData = [dictionary objectForKey:@"userData"];
    self.keypairId = [dictionary objectForKey:@"keypairId"];
    self.charge = [[ChargeSpec alloc]initWithDic:[dictionary objectForKey:@"charge"]];
    NSArray* aliasIpsArray = [dictionary objectForKey:@"aliasIps"];
    if(aliasIpsArray&&![aliasIpsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [aliasIpsArray count];i++)
        {
            AliasIpInfo* item = [[AliasIpInfo alloc]initWithDic:[aliasIpsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.aliasIps = propertyArray;
    }
    return self;
}
 @end
 
 


